Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

explicit compile #2140

Merged
merged 11 commits into from
Jul 4, 2024
Merged

explicit compile #2140

merged 11 commits into from
Jul 4, 2024

Conversation

turuslan
Copy link
Contributor

@turuslan turuslan commented Jun 28, 2024

Referenced issues

Description of the Change

  • fix wasm memory error, remove kInitialMemorySize
    • this fix is incomplete, it doesn't shrink memory back to initial size when reusing instance
    • related to WasmEdge JIT #2120
  • fix approval thread
  • fix BlockExecutor with PoolHandlerReady
  • fix Timeline thread
  • pvf worker process accepts path_compiled
  • ModuleFactory has compile(path_compiled, code) and loadCompiled(path_compiled)
  • RuntimeInstancesPool manages compile threads and cache files
  • RuntimeInstancesPool.instantiateFromCode accepts lazy code getter to defer zstd decompression
  • WAVM cache file is scale encoded and contains both wasm code (for ir/ast, wasmedge does this internally) and compiled code
  • WAVM ObjectCache is only used to load existing compiled file.
  • StorageCodeProvider doesn't decompress zstd (consistent hash, defer heavy computation)
  • CoreApiFactory reads :heappages to prevent recompilation after upgrade
  • CoreApiFactory.make accepts code and lazy trie
  • reuse/inject existing CoreApiFactory
  • RuntimeContext.fromCode accepts ModuleInstance
  • RuntimeContext doesn't need ContextParams
  • remove unused MemoryConfig.limits
  • fix ambigous create_directories
  • writeFile and writeFileTmp

Possible Drawbacks

Signed-off-by: turuslan <[email protected]>
@turuslan turuslan requested a review from Harrm June 28, 2024 06:58
Signed-off-by: turuslan <[email protected]>
Signed-off-by: turuslan <[email protected]>
@kamilsa kamilsa self-requested a review June 28, 2024 07:33
This was referenced Jul 2, 2024
@turuslan turuslan mentioned this pull request Jul 3, 2024
…ompile

Signed-off-by: turuslan <[email protected]>

# Conflicts:
#	core/injector/calculate_genesis_state.hpp
#	core/runtime/common/core_api_factory_impl.cpp
#	core/runtime/common/module_repository_impl.cpp
#	core/runtime/runtime_api/impl/core.cpp
#	test/core/runtime/runtime_test_base.hpp
Signed-off-by: turuslan <[email protected]>
Signed-off-by: turuslan <[email protected]>
Signed-off-by: turuslan <[email protected]>
Signed-off-by: turuslan <[email protected]>
Signed-off-by: turuslan <[email protected]>
@turuslan turuslan requested a review from Harrm July 4, 2024 06:15
@turuslan turuslan enabled auto-merge (squash) July 4, 2024 13:04
@turuslan turuslan merged commit 9e2aaf8 into master Jul 4, 2024
12 of 14 checks passed
@turuslan turuslan deleted the refactor/explicit-compile branch July 4, 2024 13:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants